{% extends 'template.html' %}
{% block content %}
    <style>
        .table {
            width: 95%;
            margin: 0 auto;
        }
    </style>

    <table class="table table-bordered table-hover  " id="table">
        <thead>
        <tr class="info ">
            <th>序号</th>
            <th>书名</th>
            <th>出版日期</th>
            <th>价钱</th>
            <th>出版社</th>
            <th>作者</th>
        </tr>

        </thead>
        <tbody>
        {% for books in book_list %}
            <tr class="active warning ">
            <td>{{ forloop.counter }}</td>
            {% for book in books.book %}

            <td>{{ book.0 }}</td>
            <td>{{ book.1|date:"Y-m-d" }}</td>
            <td>{{ book.2 }}</td>
            <td>{{ book.3 }}</td>
            {% endfor %}



            <td>{{ books.author|join:"," }}</td>

         </tr>
        {% endfor %}

        </tbody>
    </table>




{% endblock %}